class AuthModel {
  int errno;
  Data data;
  String errmsg;

  AuthModel({this.errno, this.data, this.errmsg});

  AuthModel.fromJson(Map<String, dynamic> json) {
    errno = json['errno'];
    data = json['data'] != null ? new Data.fromJson(json['data']) : null;
    errmsg = json['errmsg'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['errno'] = this.errno;
    if (this.data != null) {
      data['data'] = this.data.toJson();
    }
    data['errmsg'] = this.errmsg;
    return data;
  }
}

class Data {
  UserInfo userInfo;
  String token;

  Data({this.userInfo, this.token});

  Data.fromJson(Map<String, dynamic> json) {
    userInfo = json['userInfo'] != null
        ? new UserInfo.fromJson(json['userInfo'])
        : null;
    token = json['token'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.userInfo != null) {
      data['userInfo'] = this.userInfo.toJson();
    }
    data['token'] = this.token;
    return data;
  }
}

class UserInfo {
  String nickName;
  String avatarUrl;
  Null country;
  Null province;
  Null city;
  Null language;
  int gender;

  UserInfo(
      {this.nickName,
      this.avatarUrl,
      this.country,
      this.province,
      this.city,
      this.language,
      this.gender});

  UserInfo.fromJson(Map<String, dynamic> json) {
    nickName = json['nickName'];
    avatarUrl = json['avatarUrl'];
    country = json['country'];
    province = json['province'];
    city = json['city'];
    language = json['language'];
    gender = json['gender'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['nickName'] = this.nickName;
    data['avatarUrl'] = this.avatarUrl;
    data['country'] = this.country;
    data['province'] = this.province;
    data['city'] = this.city;
    data['language'] = this.language;
    data['gender'] = this.gender;
    return data;
  }
}
    //  data["'nickName'"] = "'"+this.nickName+"'";
    //  data["'avatarUrl'"] = "'"+this.avatarUrl+"'";
    //  data["'country'"] = this.country;
    //  data["'province'"] = this.province;
    // data["'city'"] = this.city;
    // data["'language'"] = this.language;
    // data["'gender'"] = this.gender;